/************************************************
 * Copyright (c) 2007 ~ 2009, 
 * All rights reserved.
 * Version   : 1.0
 * Author    : lengsh@gmail.com 
 * Date      : 2009.1.2
 ************************************************/

#ifndef  __COBWEBSQLITE__H__
#define  __COBWEBSQLITE__H__

#include <sys/types.h>
#include <iostream>
#include <iomanip>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <string>
#include <sqlite3.h>

using namespace std;

class CobWebSqlite
{
	protected:
                string m_dbName;
		sqlite3  *db;
                int MAXT;
	public:
	public:
		CobWebSqlite(const char *name, int max);
		~CobWebSqlite();
		bool Initialize();
		bool Save(char *key, char *name, char *val, long expire );
		bool Replace(char *key, char *name, char *val, long expire );
		bool Fetch(char *key, string &name, string &val, long &stamp);
	private:

};

#endif  // __EVENTS_CONNECTION__H__
